import os

from constants import DB_URI
SQLALCHEMY_DATABASE_URI = DB_URI
SQLALCHEMY_TRACK_MODIFICATIONS = True

# 密钥
SECRET_KEY = 'hyx'

# 邮箱配置
MAIL_SERVER = 'smtp.qq.com'
MAIL_PORT = 465
MAIL_USE_TLS = False
MAIL_USE_SSL = True
MAIL_DEBUG =True
MAIL_USERNAME= '1429940482@qq.com'
MAIL_PASSWORD = 'unwclsxhclqejjee'
MAIL_DEFAULT_SENDER = '1429940482@qq.com'

# 项目路径
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# 静态文件夹的路径
STATIC_DIR = os.path.join(BASE_DIR,'static')
TEMPLATE_DIR = os.path.join(BASE_DIR,'templates')
IMAGE_DIR = os.path.join(STATIC_DIR,'images')
UPLOAD_DIR = os.path.join(IMAGE_DIR,'upload')


# 图片格式
ALLOWED_EXTENSIONS = ['png','jpg','jpeg','gif']
